package old.apiday03;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

//集合转换为数组
public class CollectionToArray {
    public static void main(String[] args) {
        Collection<String>c= new ArrayList<>();
        c.add("one");
        c.add("two");
        c.add("three");
        c.add("four");
        c.add("five");
        String[]array=c.toArray(new String[8]);
        System.out.println(Arrays.toString(array));


    }
}
